package org.springblade.pm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目费用计划表
 */
@Data
@TableName("blade_pm_cost_plan")
@EqualsAndHashCode
public class CostPlan implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	@ApiModelProperty(value = "主键id")
	private Integer id;
	/**
	 * 项目id
	 */
	@ApiModelProperty(value = "项目id")
	private Integer	projectId;

	/**
	 * 差旅费用
	 */
	@ApiModelProperty(value = "项目id")
	private BigDecimal strokeCost;

	/**
	 * 团建费用
	 */
	@ApiModelProperty(value = "团建费用")
	private BigDecimal teamCost;

	/**
	 * 其他费用
	 */
	@ApiModelProperty(value = "其他费用")
	private BigDecimal otherCost;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	private Integer createUser;

	public CostPlan(BigDecimal strokeCost, BigDecimal teamCost, BigDecimal otherCost) {
		this.strokeCost = strokeCost;
		this.teamCost = teamCost;
		this.otherCost = otherCost;
	}
}
